from entity import *

user1=User()
user1.show()
print(user1.count)

user2=User("admin",18,"male","111111@qq.com")
print(User.count) #私有属性无法直接访问
User.count=100
print(user2.count)

user2.phone="157XXXXXX"

user3=User("ROOT",18,"male","111111@qq.com")
user3.show()
# User.show() # 类名不可调用实例方法
print("--------------------------")
#类方法和静态方法，优先通过类名调用
User.show1()
# user.show2()

user4=User
user5=User("ry")
user6=User("ry",18)
user7=User("ry",18,"male")
user8=User("ry",18,"male","111111")
user5.setName("ry999")
print(user5.getName())
print("-----------------------------")

child1=Child()
child1.show()
child1.study()
print(child1.name)
print(child1.age)
# print(child1.__sex) #不报错 也没值